package com.atguigu.filter.servlet;


import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(urlPatterns = "/public/ResServlet02")
public class ResServlet02 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
        PrintWriter writer = response.getWriter();
        writer.write("<h1>公共资源 02</h1>");
        writer.write("白日依山尽，<br/>");
        writer.write("黄河入海流。<br/>");
        writer.write("欲穷千里目，<br/>");
        writer.write("更上一层楼。<br/>");
        writer.write("<a href='/index.jsp'>回首页</a>");
    }
}
